﻿@model IEnumerable<BskLeague.Models.Match>

@{
    ViewBag.Title = "Terminarz";

}

    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function () {
        var count = 0;

        $("#playedButton").click(function () {
            $(".toPlay").fadeOut(2000);
            $(".played").fadeIn(2000);
        });

        $("#toPlayButton").click(function () {
            $(".played").fadeOut(2000);
            $(".toPlay").fadeIn(2000);
        });


        $("#allButton").click(function () {
            $(".played").fadeIn(2000);
            $(".toPlay").fadeIn(2000);
        });
    });
	   
</script>

<h2>Terminarz meczowy</h2>


@using (Ajax.BeginForm("Filter","Schedule",new AjaxOptions{UpdateTargetId="Matches", InsertionMode=InsertionMode.Replace, HttpMethod="Post"})) {
    @Html.ValidationSummary(true)
    <fieldset>
    <legend>Wybierz dane</legend>
         <label>Wybierz sezon</label>
         @Html.DropDownList("Season", (IEnumerable<SelectListItem>)ViewBag.seasonsForDropDown)    
        <label>Wybierz rundę</label>
        @Html.DropDownList("Round", (IEnumerable<SelectListItem>)ViewBag.itemsForDropDown) 
        <label>Rodzaj meczu</label>
        @Html.DropDownList("gamesTypes", (IEnumerable<SelectListItem>)ViewBag.gamesTypes) 
        <label>Wybierz obiekt</label>
         @Html.DropDownList("Stadium", (IEnumerable<SelectListItem>)ViewBag.stadiumsForDropDown)    

         <input type="submit" value="Filtruj" />
        
    </fieldset>
}


<div id="Matches">
@{
    Html.RenderPartial("ListMatchesPartial", Model);  
}
</div>

